home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / cdt / test / test.c next >
C/C++ Source or Header  |  1996-04-07  |  2KB  |  98 lines

  1. /*
  2. ** $PROJECT: c.datatype
  3. **
  4. ** $VER: test.c 39.3 (29.08.95)
  5. **
  6. ** by
  7. **
  8. ** Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
  9. **
  10. ** (C) Copyright 1995
  11. ** All Rights Reserved !
  12. **
  13. ** $HISTORY:
  14. **
  15. ** 29.08.95 : 039.003 : added V39.14 fixed errors (Tab size=3)
  16. ** 28.06.95 : 039.002 : added V39.11 fixed errors
  17. ** 28.04.95 : 039.001 : initial
  18. */
  19.  
  20. /* This file contains parts, which produced parse errors in version 39.6 and
  21.  * before.
  22.  */
  23.  
  24. /* if comment was mark as TEXT (c.prefs), the comment line wasn't wrapped
  25.  *
  26.  * Reported from Swen Stullich
  27.  */
  28.  
  29. void test(void)
  30. {
  31.     int a;
  32. // int b;
  33.     int c;
  34.  
  35.     return;
  36. }
  37.  
  38. /* a backslash at the end of a line in a string to continue the string wasn't
  39.  * handled correctly !
  40.  *
  41.  * Reported from Klaus A Seistrup.
  42.  */
  43.  
  44. static char string[] = "\
  45. This is a test\n\
  46. Ok\n";
  47.  
  48. /* a backslash at the end of a line wasn't handled correctly
  49.  *
  50.  * Reported from Jens Toivo Berger Thielemann
  51.  */
  52.  
  53.  
  54. static char string[] = "This is a second test\n" \    /* test */
  55.                               "with two three lines\n" \
  56.                               "Ok\n";
  57.  
  58. /* Errors before V39.11 */
  59.  
  60. /* a C++ comment followed by a cpp keyword produced a parse error
  61.  *
  62.  * Reported from Timo C. Nentwig.
  63.  */
  64.  
  65. #include <test1.h>      // C++ comment
  66. #include <test2.h>
  67.  
  68. /* tabs in a string weren't handled correctly
  69.  */
  70.  
  71. char *test = "Tabs          String      Test";
  72.  
  73. #if defined(TEST) && !defined(TEST2)
  74. #endif
  75.  
  76. /* Errors before V39.14 */
  77.  
  78. /*
  79.  * Reported from Michal Letowski.
  80.  */
  81.  
  82. /* Inconsequence in treating header files names */
  83. #include <stdio.h>
  84. #include "stdio.h"
  85.  
  86. /* Bad // comments */
  87. //            This comment is bad
  88.  
  89. /* 0X wasn't handled correctly */
  90. #define M1    0XdeadBEEF
  91. #define M2    0xDEADbeef                                    /* test */
  92.  
  93.                     State=STATE_FRACTION,CH++;            /* This comments begin */
  94.                 elif(*CH=='\0')                            /* at column 49 <BAD> */
  95.                     State=STATE_DONE;                        /* in my editor */
  96.  
  97. /* Last line is not LF-terminated */
  98. #include "test.h"